home *** CD-ROM | disk | FTP | other *** search
/ CD Actual 9 / CDACTUAL9.iso / share / Dos / VARIOS / pascal / SWAG9605.DDD / 0073_How to find text on the screen.pas < prev    next >
Encoding:
Pascal/Delphi Source File  |  1996-05-31  |  2.5 KB  |  51 lines

  1. {----------------------------------------------------------------------------}
  2. { CCHAR Character Detection unit                                             }
  3. {                                                                            }
  4. { All material contained herein is (c) Copyright 1995-96 Intuitive Vision    }
  5. { Software.  All Rights Reserved.                                            }
  6. {                                                                            }
  7. { MODULE     :  CCHAR.PAS                                                    }
  8. { AUTHOR     :  George A. Roberts IV                                         }
  9. {                                                                            }
  10. {----------------------------------------------------------------------------}
  11. { Intuitive Vision Software is a Division of Intuitive Vision Computer       }
  12. { Services.                                                                  }
  13. {----------------------------------------------------------------------------}
  14. { This source is copyrighted material of Intuitive Vision Software.  It may  }
  15. { be used freely in any non-commercial software package without any          }
  16. { royalties, providing that mention is given in the documentation of the fact}
  17. { that this source code has been used.  The notice should be placed in the   }
  18. { following manner:                                                          }
  19. {                                                                            }
  20. { This software package uses the CCHAR Character Detection Unit which is     }
  21. { (c) Copyright 1995-96 Intuitive Vision Software.  All Rights Reserved.     }
  22. { Used by permission.                                                        }
  23. {                                                                            }
  24. { This source code may be reproduced in tutorials and help files, such as    }
  25. { the SWAG archives, providing that it is reproduced in its entirety,        }
  26. { including the above copyrights and notices.                                }
  27. {----------------------------------------------------------------------------}
  28.  
  29. UNIT CCHAR;
  30.  
  31. uses crt;
  32.  
  33. CONST vidseg:word=$B800;
  34.  
  35. var c:char;
  36.  
  37. procedure checkvidseg;
  38. begin
  39.   if (mem[$0000:$0449]=7) then vidseg:=$B000 else vidseg:=$B800;
  40. end;
  41.  
  42. function currentchar:char;
  43. begin
  44.       checkvidseg;
  45.       inline($FA);
  46.       currentchar:=chr(mem[vidseg:(160*(wherey-1)+2*(wherex-1))]);
  47.       inline($FB);
  48. end;
  49.  
  50. end.
  51.